Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Yuvanshu Maini, Abhishek Jha, Prateek Garg, Dr. Jyoti Sharma
DOI Link: https://doi.org/10.22214/ijraset.2023.48660
Certificate: View Certificate
I. INTRODUCTION
The use of artificial intelligence in the field of healthcare is increasing rapidly, with the development of chatbots being one of the most promising areas of growth. Chatbots are computer programs that use artificial intelligence to interact with people through a chat interface, and they have the potential to revolutionize the way we access and receive health care. One key area where chatbots can have a significant impact is in providing quick and convenient access to medical information and advice. Many people have questions about their health, but may not have the time or resources to visit a clinic or speak with a health care provider. A chatbot can provide an alternative, allowing people to get answers to their questions and receive basic medical advice at any time, from any location. The use of decision tree algorithms in chatbots is also becoming more common, as it allows the chatbot to analyze multiple factors and provide a response based on the most appropriate course of action. This can be particularly useful in the field of health care, where the chatbot can take into account a person's medical history and current symptoms to provide personalized advice. Voice-based artificial intelligence (AI) chatbot using machine learning is an emerging technology that is revolutionizing the way businesses interact with customers and other stakeholders. By leveraging AI and machine learning, voice-based AI chatbot-enabled businesses can provide automated customer service, reduce cost, and improve customer engagement. This paper will discuss the various components of a voice-based AI chatbot, the various machine learning techniques used in building a chatbot, and how businesses can benefit from using this technology.
Medical chatbots, also known as health chatbots, are computer programs designed to simulate conversation with human users, with the aim of providing medical information and support to patients. In recent years, the use of voice-based medical chatbots that use artificial intelligence (AI) and machine learning (ML) has gained popularity as a means of providing efficient and convenient healthcare services to patients. In this research paper, we will explore the potential benefits and limitations of using voice-based medical chatbots with AI and ML, and discuss the current state of the technology and its future potential in the healthcare industry.
In this research paper, we will explore the use of chatbots in the field of health care, with a focus on the use of decision tree algorithms to provide medical advice. We will discuss the potential benefits of chatbots for both patients and health care providers, and examine the current state of chatbot technology in the healthcare industry. Finally, we will consider the challenges and limitations of chatbots in this context, and suggest possible directions for future research and development.
II. ABSTRACT
A health care chatbot is a computer program that uses artificial intelligence to interact with people through a chat interface. The chatbot is able to answer questions about health and provide medical advice by using a decision tree algorithm to determine the best response based on the information provided. The decision tree algorithm allows the chatbot to analyze multiple factors and make a decision based on the most appropriate course of action. This chatbot can be a useful tool for people seeking quick, convenient access to health information and advice. For patients, the chatbot can be a quick and easy way to get answers to health-related questions and concerns. They can use the chatbot at any time, from any location, without the need to make an appointment or visit a clinic. This can be especially useful for people who live in remote areas or have busy schedules, as it allows them to access medical advice without the need for face-to-face interactions. For health care providers, the chatbot can help to reduce the workload by answering common questions and providing basic medical advice. This can free up time for the health care providers to focus on more complex cases and provide higher quality care to their patients. For patients, the chatbot can be a quick and easy way to get answers to health-related questions and concerns. They can use the chatbot at any time, from any location, without the need to make an appointment or visit a clinic. This can be especially useful for people who live in remote areas or have busy schedules, as it allows them to access medical advice without the need for face-to-face interactions. In addition to providing access to medical information and advice, a health care chatbot using a decision tree algorithm can also improve the efficiency and effectiveness of the health care system as a whole. By automating routine tasks and allowing health care providers to focus on more complex cases, the chatbot can help to reduce wait times and improve patient outcomes.
Overall, a health care chatbot using a decision tree algorithm has the potential to revolutionize the way we access and receive health care, by providing quick and convenient access to medical information and advice, and improving the efficiency and effectiveness of the healthcare system.
A. Tech Used
a. JavaScript: JavaScript is a scripting or programming language that allows you to implement complex features on web pages - every time a web page does more than just sit there and display static information for you to look at - displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc.
b. Flask: Healthcare chatbot built with Flask could also be used to schedule appointments, refill prescriptions, and provide reminders for taking medications. The chatbot could be integrated with electronic medical records to ensure that all of the information provided to the patient is up-to-date and accurate. Overall, the use of Flask in building a healthcare chatbot allows for a fast and efficient way for patients to access medical information and services. It can provide a convenient and accessible way for patients to manage their health, and can help to reduce the burden on healthcare providers by handling routine tasks and answering common questions.
2. Back-End
a. Numpy: A health care chatbot may need to process and analyze large datasets, such as patient medical records or disease prevalence data, and Numpy provides efficient and effective tools for working with this type of data. For example, Numpy arrays can be used to store and manipulate large datasets, and Numpy functions can be used to perform statistical analyses or machine learning algorithms on these datasets. Another use of Numpy in a health care chatbot project is in the calculation of probabilities and predictions. Decision tree algorithms often involve the calculation of probabilities and the prediction of outcomes based on these probabilities. Numpy provides a range of mathematical functions that can be used to perform these calculations, including functions for calculating means, medians, and standard deviations.
b. Sci-kit: The Scikit library is a powerful tool that can be used in the development of a healthcare chatbot using decision tree algorithms. Scikit is a Python library that provides a range of machine learning algorithms, including decision trees. It is open-source and widely used in the field of data science and machine learning. One of the main benefits of using the Scikit library in a health care chatbot project is its simplicity and ease of use. The library includes a range of pre-built algorithms and functions that can be easily implemented in a chatbot application. This can help to streamline the development process and allow the chatbot to be up and running quickly. The Scikit library also has a strong focus on performance and scalability. It is optimized for large datasets and can handle a high volume of queries efficiently.
c. Pandas: In a healthcare chatbot project using a decision tree algorithm, Pandas could be utilized in a number of ways to improve the chatbot's performance and accuracy. One potential use of Pandas in this context is to preprocess and clean data before it is used to train the decision tree model. For example, Pandas could be used to remove missing or corrupted data, or to transform the data into a more suitable format for the model. This could help to improve the quality of the training data and increase the accuracy of the model. Pandas could also be used to perform statistical analysis on the data, such as calculating summary statistics or generating plots and charts. This could help the chatbot developers to better understand the data and identify any trends or patterns that might be relevant to the chatbot's performance.
d. Seaborn and Matplotlib: A matplotlib-based python data visualization library is called Seaborn. It provides a high-level interface for drawing attractive and informative statistical graphics. It can handle large datasets and has good performance even with many data points. It is free and open source, and is available for use under the BSD license. Seaborn and Matplotlib are both visualization libraries in Python that can be used to create visualizations of a decision tree. Seaborn is a higher-level library that is built on top of Matplotlib and is easier to use. It allows you to create a wide range of visualizations with relatively little code. You can also use Matplotlib to create visualizations of a decision tree, although it requires more code and is more low-level.
III. LITERATURE SURVEY
[2] The research paper "Service chatbots: A systematic review" does not evaluate the effectiveness of chatbots using ranking algorithms in AI which is an important aspect of providing an accurate and personalized counseling experience. While the systematic review provides a broad overview of the current state of service chatbots, a more focused examination of chatbots in the healthcare industry, specifically decision tree Health Care Chat bot, would provide more insights into the potential benefits and limitations of this technology in the healthcare context.
[3] This research paper "Study on emotion recognition and companion Chatbot using deep neural network" by Lee et al. (2020) proposes a deep neural network (DNN) model that recognizes emotions from speech and text data, as well as a companion chatbot that can respond to users' emotions in a natural and empathetic manner. The system is evaluated using a user study, where the DNN model achieved an accuracy of 78.3% in recognizing emotions and users found the companion chatbot to be natural and empathetic in its responses.
[4] In this research paper "Intelligent Counseling Bot Using Ranking Algorithms in AI" by Sakthivel et al. (2018), the authors propose the use of ranking algorithms in AI to develop an intelligent counseling bot. The bot is designed to provide counseling to individuals in the areas of mental health and personal development. The authors use a dataset of counseling sessions to train the bot and evaluate its performance.
[5] While "Long short-term memory" by Hochreiter and Schmidhuber (1997) are a powerful technique in AI, they may not be the best choice for developing a health care chatbot due to the specific requirements of the healthcare domain such as interpretability, robustness, and computational efficiency. Decision tree based chatbot may be a better choice for these types of applications.
[8] The system uses a question-and-answer protocol in the form of a chatbot to answer users' queries. The complex questions and answers present in the database are viewed and answered by an expert. This chatbot is comparatively time consuming.
[9] The research paper "New types of deep neural network learning for speech recognition and related applications: An overview" by Deng et al. (2013) focuses on the use of deep neural networks (DNNs) for speech recognition and related applications. The authors discuss the advantages of DNNs over traditional methods and present a summary of recent research in this area. While DNNs have been shown to be effective in speech recognition and other applications, they may not be the best approach for developing a health care chat bot. Decision trees, on the other hand, are a simple and interpretable algorithm that can be used to classify data and make predictions. They can also be used to develop a health care chatbot that can provide accurate and relevant responses to users.
[10] This paper only focuses on the speech recognition aspect of the bot, and does not address the ability of the bot to provide accurate and relevant responses to users. In comparison, the decision tree health care chatbot uses a decision tree algorithm to provide accurate and relevant responses to users based on their input. The decision tree algorithm allows the chatbot to understand the user's query and provide an appropriate response based on the user's input.
IV. IDEA AND APPROACH
A. Use Cases
The examples below show several methods by which a chatbot can be deployed. A chatbot can act as a web guide. At its most fundamental change, this can take the form of a guide to help the user understand the features and highlight major components of the system, website, or software.
At its most complex, it can be a full chatbot capable of handling questions a visitor might ask about a site, organization or its products or services – providing the visitor with web pages relevant to the query. This is used generally to improve accessibility of websites without sacrificing the experience for persons who are blind.
B. Planning of work
As we all know, the use of automated devices, or the interaction between machines and people, is growing daily. Humans could very well be replaced by autonomous bots for carrying out particular system functions in the near future. The input from the user will be received by a chatbot in the form of audio or speech in the central system. A microphone can be used to capture the input, which will then be transformed using pre-existing libraries into the relevant text input. Then, this textual input will be given to the chatbot in the system, which will use Natural Language Processing to create the attributes from the input.
Two cases will be generated:
Once the system knows what output is to be given to the user, the output is generated in a textual format/voice-based format. These formats are then converted to voice using pre-existing libraries and a text note/voice note is generated.
C. Architecture Diagram
The figure above is the architecture outline of a healthcare chatbot application. Starting with front end client logins into the web application made using flask which is used for making the front end and User interface for the chatbot. Input is taken using voice or text and further the chatbot directs the conversation to a decision-making question answer format through which it takes input from the user, the input should be symptoms.
As both voice and text-based input functionality is available, if the input is in text it is directed towards our engine that is the chatbot or if the input is in voice it is converted to a text using speech recognition. After the input process if completed our chatbot will process the inputs and use decision tree model and algorithm to determine the disease or if not able to, will ask for new symptoms. During the disease recognition process it will access the symptom dataset that has been scraped already and converted to manual or testing and training data specifically.
The symptoms will be matched to the training dataset and highest weight matches will be recognized using the Gini index. When it is able to get a proper accuracy score of a disease it will display the disease as output. If the input was sent as voice it will be converted from text to speech using Google text to speech API and then finally be displayed. This acts as a first aid relief mechanism by informing users of a potential threat to his health.
V. IMPLEMENTATION AND RESULTS
A. Data Collection
Disease symptom knowledge database was used based on information from discharge summaries of patients in New York Presbyterian Hospital admitted during 2004. This is a Scraped Data set which is manually trained and tested and a decision tree algorithm is applied to get accuracy scores.
B. Decision Tree Algorithm
Decision tree is a type of machine learning model. It belongs to the category of supervised learning algorithms, which means that it is trained on labeled data and can be used to predict the class or value of a target variable for new, unseen data. A decision tree is a flowchart-like tree structure that makes decisions based on the features of the input data.
It works by splitting the input data into smaller and smaller groups based on the values of the features, until it reaches a point where the data can be split no further, at which point it forms a decision or prediction based on the data in that group. Decision trees are often used in classification tasks, where the goal is to predict the class label of a given input data point. They can also be used for regression tasks, where the goal is to predict a continuous target variable.
The Gini index is a measure of the impurity of a group of observations in a decision tree. It is used to determine the split point at each node in the tree that results in the purest possible subgroups.
The Gini index is calculated as follow:
Calculate the frequency of each class in the group.
Calculate the sum of the squares of the frequencies of each class.
Subtract the result from 1.
The Gini Index ranges from 0 ( perfectly pure group ) to 1 ( completely impure group). To use the gini index to calculate the accuracy score of a symptom in a trained data set , we can follow these steps :
Split the data set into training and testing sets.
Train the decision tree model on the training set.
Make predictions on the testing set using the trained model.
Calculate the accuracy score by comparing the predictions to the true values in the testing set.
This ultimately leads to a more accurate model , as the model is able to make more informed decisions based on the structure of the tree. Fig below shows how the decision tree is set using a trained dataset.
C. Execution
The decision tree works with the mentioned symptoms to predict a disease. We take input from the user’s top 5 symptoms and put it in an array with value assigned as 1. Then this is passed to our chatbot engine which is our model that predicts the disease. The array that was defined matches the disease data collection and ends at a common leaf node with the highest degree of accuracy. From fig. 5.1. It is seen that The redness_of_eyes is the top symptom that has the highest Gini impurity score of 0.9755. Then comes internal_itchiness with a score of 0.9749 and so on. Basically this implies that the redness_of_eyes symptom has the potential to divide most samples into particular classes and hence is selected as the root of the decision tree. From there we move down with decreasing order of Gini scores. This means that we will predict the disease where the only symptom is redness of eyes. According to the array of symptoms it has the highest confidence in the common cold. The predictions would improve on taking more symptoms as input.
Table 5.1. List of diseases
Fungal infection |
Alcoholic Hepatitis |
Allergy |
Tuberculosis |
GERD |
Common Cold |
Chronic cholestasis |
pneumonia |
Drug Reaction |
Dimorphic hemorrhoids(piles) |
Peptic ulcer disease |
Heart attack |
AIDS |
Varicose veins |
Diabetes |
Hypothyroidism |
Gastroenteritis |
Hyperthyroidism |
Bronchial Asthma |
Hypoglycaemia |
Hypertension |
Osteoarthritis |
Migraine |
Arthritis |
Cervical spondylosis |
Vertigo |
Paralysis |
Acne |
Jaundice |
Urinary tract infection |
Malaria |
Psoriasis |
Chicken pox |
Impetigo |
Dengue |
Hepatitis B |
Typhoid |
Hepatitis C |
Hepatitis A |
Hepatitis D |
D. Equation
When deciding whether to include a feature in a split on a decision tree, the sentence score equation is used to assess the merit of each feature (in this case, a sentence). The sentence score equation could be used to identify which sentence offers the greatest clues regarding the presence or absence of a specific symptom in a series of sentences when trying to anticipate symptoms. This statement will then be used by the decision tree algorithm to divide the data into two groups: those who have the symptom and those who do not. Next, the process is repeated on each of the resulting subgroups, and the process continues until the tree is fully grown.
Sentence score = frequency score + medical score , final score = S + N
Here , N stands for Number of words in a sentence.
E. Comparative Analysis
As seen from the figure above the decision tree is better than Logistic regression and support vector machine in accuracy score. The comparison between k- Nearest Neighbor is hardly comparable as seen from the graph. After applying confusion matrix on each algorithm the decision tree had best cross result [0.96678967 , 0.98336414 , 0.97042514] , 0.973526315669811
The use of chatbots in the field of healthcare is a rapidly growing area, with the potential to revolutionize the way we access and receive medical information and advice. Chatbots are computer programs that use artificial intelligence to interact with people through a chat interface, and they have the ability to provide quick and convenient access to medical information and advice at any time, from any location.One key aspect of chatbots that has been gaining attention in the healthcare industry is the use of decision tree algorithms to provide personalized medical advice. Decision tree algorithms allow the chatbot to analyze multiple factors and make a decision based on the most appropriate course of action, taking into account a person\'s medical history and current symptoms. This can be particularly useful in providing personalized and accurate medical advice to patients.Overall, the use of chatbots in the field of health care has the potential to greatly improve access to medical information and advice, and to improve the efficiency and effectiveness of the healthcare system as a whole. Chatbots can help to reduce workloads for health care providers, allowing them to focus on more complex cases and provide higher quality care to their patients. They can also provide a convenient and accessible way for people to get answers to their health-related questions and concerns.There are many potential directions for future research and development in the field of health care chatbots. Some possible areas for exploration include:Improving the accuracy and personalization of medical advice: Further research could be conducted to improve the ability of chatbots to provide accurate and personalized medical advice based on a person\'s unique medical history and current symptoms. This could involve the development of more advanced machine learning algorithms or the incorporation of additional data sources.
Article [1] S. Swain, S. Naik, A. Mhalsekar, H. Gaonkar, D. Kale and S. Aswale, \"Healthcare Chatbot System: A Survey,\" 2022 3rd International Conference on Intelligent Engineering and Management (ICIEM), London, United Kingdom, 2022, (pp. 75-80). [2] Suhaili, S.M., Salim, N. and Jambli, M.N “Service chatbots: A systematic review. Expert Systems with Applications”, 2021 Dec 1 (pp.115461). [3] Lee, M.C., Chiang, S.Y., Yeh, S.C. and Wen, T.F., “Study on emotion recognition and companion Chatbot using deep neural network”. Multimedia Tools and Applications ,2020 Mar 27 (pp. 19629-19657). E-Books [1] Sakthivel V, Srihari K, Karthik S, Anisha CD. “Intelligent Counseling Bot Using Ranking Algorithms in AI ”. 2018 International Conference on Soft-computing and Network Security (ICSNS), 2018 Feb 14 (pp. 1-7). [2] Hochreiter, S. and Schmidhuber, J., “Long short-term memory”. Neural computation, 1997 Nov 15 (pp.1735-1780). [3] Agarwal, B. and Mittal, N., “Machine learning approach for sentiment analysis, Prominent feature extraction for sentiment analysis”, 2015 Dec 15 (pp. 21-45). Journal Article in Scholarly Journal (published free of charge on the Internet) [1] Sacks, J.M. and S. Levy, \"The Sentence Completion Test\", In L.E. Abt & L. Bellak(Eds.), Projective Psychology : Clinical Approaches to the Total Personality, 1950 (pp. 357-402) . [2] S Radhika , S Ramiya Shree , V Rukhmani Divyadharsini and A Ranjitha4. “Symptoms Based Disease Prediction Using Decision Tree and Electronic Health Record Analysis ” In European Journal of Molecular and Clinical Medicine. 2020 Volume 7, Issue 4 (pp. 2515-8260). Paper Published in Conference Proceedings [1] Deng L, Hinton G, Kingsbury B. “New types of deep neural network learning for speech recognition and related applications: An overview. In2013 IEEE international conference on acoustics, speech and signal processing”, 2013 May 26 (pp. 8599-8603). [2] Pathak A, Patel D, Panchal B, Patel R, Kadu R. “Speech Recognition Bot”. In 2nd International Conference on Advances in Science & Technology (ICAST) 2019 Apr 8 (pp. 1-4). [3] Sakthivel V, Srihari K, Karthik S, Anisha CD. “Intelligent Counseling Bot Using Ranking Algorithms in AI”. In 2018 International Conference on Soft-computing and Network Security (ICSNS) 2018 Feb 14 (pp. 1-7).
Copyright © 2023 Yuvanshu Maini, Abhishek Jha, Prateek Jha, Dr. Jyoti Sharma. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET48660
Publish Date : 2023-01-14
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here